package com.atguigu.jxc.controller;/*
 *@author 尹凯瑞
 *@date 2020/12/4 11:11
 */

import com.atguigu.jxc.service.UnitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("unit")
public class UnitController {

    @Autowired
    private UnitService unitService;
    //查询所有商品单位
    @RequestMapping("/list")
    public Map<String,Object> selectAllUnit(){
        return unitService.getAllUnit();
    }

    //http://localhost:8080/unit/list
}
